/*
 * set_check_and_unset_states.c
 *
 *  Created on: Apr 2, 2013
 *      Author: filipe
 */

#include <stdio.h>
#include <GL/gl.h>

int
main(int argc, char **argv)
{
	unsigned char luz;

	glEnable(GL_LIGHTING); 	//Habilita luz - GL_LIGHTING é a variável de estado

	luz = glIsEnabled(GL_LIGHTING); // retorna 1 (verdadeiro)

	if (luz == 0) printf("lighting is set: false\n");
	else printf("lighting is set: true\n");

	glDisable(GL_LIGHTING); //Desabilita luz

	luz = glIsEnabled(GL_LIGHTING); // retorna 0 (falso)

	if (luz == 0) printf("lighting is set: false\n");
	else printf("lighting is set: true\n");

	return 0;
}






